## Math Constants
/// τ = 2π
export const Tau: Float := (2.0 * Pi);

/// π = arccos(-1)
export const Pi: Float := { acos -1.0 };

/// e = exp(1)
export const E: Float := { exp 1.0 };


## Math Basic Operators

export function +: &(Integer,Integer) => Integer  native 'i+i';
export function -: &(Integer,Integer) => Integer  native 'i-i';
export function -: &(Integer) => Integer          native '-i';
export function *: &(Integer,Integer) => Integer  native 'i*i';
export function /: &(Integer,Integer) => Integer  native 'i/i';
export function %: &(Integer,Integer) => Integer  native 'i%i';

export function +: &(Number,Number) => Number  native 'i+i';
export function *: &(Number,Number) => Number  native 'i*i';
export function /: &(Number,Number) => Number  native 'i/i';
export function %: &(Number,Number) => Number  native 'i%i';

export function -!: &(Number,Number) => Number  native 'n-!n';

export function +: &(Float,Float) => Float  native 'f+f';
export function -: &(Float,Float) => Float  native 'f-f';
export function -: &(Float) => Float        native '-f';
export function *: &(Float,Float) => Float  native 'f*f';
export function /: &(Float,Float) => Float  native 'f/f';
export function %: &(Float,Float) => Float  native 'f%f';

export function +: &(Complex,Complex) => Complex  native 'c+c';
export function +: &(Float,Complex)   => Complex  native 'f+c';
export function +: &(Complex,Float)   => Complex  native 'c+f';
export function -: &(Complex,Complex) => Complex  native 'c-c';
export function -: &(Float,Complex)   => Complex  native 'f-c';
export function -: &(Complex,Float)   => Complex  native 'c-f';
export function -: &(Complex) => Complex          native '-c';
export function *: &(Complex,Complex) => Complex  native 'c*c';
export function *: &(Float,Complex)   => Complex     native 'f*c';
export function *: &(Complex,Float)   => Complex     native 'c*f';
export function /: &(Complex,Complex) => Complex  native 'c/c';
export function /: &(Float,Complex)   => Complex     native 'f/c';
export function /: &(Complex,Float)   => Complex     native 'c/f';


## Math Advanced Operators

export function **:     &(Integer,Integer) => Integer            native 'i**i';
export function modexp: &(Integer,Integer,Number) => Integer     native 'modexp';
export function quorem: &(Integer,Integer) => (Integer,Integer)  native 'quorem';
export function divmod: &(Integer,Integer) => (Integer,Integer)  native 'divmod';

export function **:    &(Float,Float) => Float  native 'f**f';
export function floor: &(Float) => Float        native 'floor';
export function ceil:  &(Float) => Float        native 'ceil';
export function round: &(Float) => Float        native 'round';

export function sqrt: &(Float) => Float  native 'float-sqrt';
export function cbrt: &(Float) => Float  native 'float-cbrt';
export function  exp: &(Float) => Float  native 'float-exp';
export function  log: &(Float) => Float  native 'float-log';

export function  sin: &(Float) => Float  native 'float-sin';
export function  cos: &(Float) => Float  native 'float-cos';
export function  tan: &(Float) => Float  native 'float-tan';
export function asin: &(Float) => Float  native 'float-asin';
export function acos: &(Float) => Float  native 'float-acos';
export function atan: &(Float) => Float  native 'float-atan';

export function atan2: &({ y:Float, x:Float }) => Float
    native 'atan2';

export function sqrt: &(Complex) => Complex  native 'complex-sqrt';
export function cbrt: &(Complex) => Complex  native 'complex-cbrt';
export function  exp: &(Complex) => Complex  native 'complex-exp';
export function  log: &(Complex) => Complex  native 'complex-log';

export function  sin: &(Complex) => Complex  native 'complex-sin';
export function  cos: &(Complex) => Complex  native 'complex-cos';
export function  tan: &(Complex) => Complex  native 'complex-tan';
export function asin: &(Complex) => Complex  native 'complex-asin';
export function acos: &(Complex) => Complex  native 'complex-acos';
export function atan: &(Complex) => Complex  native 'complex-atan';

